#pragma once

#include <exception>
#include <glibmm/ustring.h>

namespace BuildNG
{
  class Exception : public std::exception
  {
  public:
    Exception(const Glib::ustring &msg)
    {
      this->msg = msg;
    }
    
    virtual ~Exception() throw()
    {
    }
    
    virtual Glib::ustring get_message() const
    {
      return msg;
    }
    
    virtual const char* what() const throw()
    {
      msg = get_message();
      return msg.c_str();
    }

  protected:
    Exception(){}
    
  private:
    mutable Glib::ustring msg;
  };
}
